/* 登录容器 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  position: relative;
  overflow: hidden;
  padding: 20px;
}

/* 主题样式 */
.login-container.theme-default {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e) !important;
}

.login-container.theme-green {
  background: linear-gradient(135deg, #1a2a1d, #2c5f2d, #243b24) !important;
}

.login-container.theme-purple {
  background: linear-gradient(135deg, #2d1a2d, #5e2a5e, #3b243b) !important;
}

.login-container.theme-darkblue {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e) !important;
}

.login-container.theme-blackblue {
  background: linear-gradient(135deg, #000000, #000000, #001529) !important;
}

/* 背景层 */
.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

/* 粒子效果 */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: float 6s infinite ease-in-out;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.6;
  }
  50% {
    transform: translate(20px, 20px);
    opacity: 1;
  }
}

/* 网格线 */
.grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(102, 126, 234, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 126, 234, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(30px, 30px);
  }
}

/* 悬浮元素 */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.element {
  position: absolute;
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  animation: float-element 15s infinite linear;
}

.element-1 {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 5%;
  animation-duration: 20s;
}

.element-2 {
  width: 120px;
  height: 120px;
  bottom: 15%;
  right: 10%;
  animation-duration: 25s;
  animation-direction: reverse;
}

.element-3 {
  width: 60px;
  height: 60px;
  top: 40%;
  right: 20%;
  animation-duration: 18s;
}

.element-4 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 15%;
  animation-duration: 22s;
  animation-direction: reverse;
}

@keyframes float-element {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, 30px) rotate(90deg);
  }
  50% {
    transform: translate(0, 60px) rotate(180deg);
  }
  75% {
    transform: translate(-20px, 30px) rotate(270deg);
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
  }
}

/* 登录卡片 */
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 30px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 10;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transform: rotate(45deg);
  animation: shine 6s infinite;
}

@keyframes shine {
  0% {
    transform: rotate(45deg) translateX(-100%);
  }
  100% {
    transform: rotate(45deg) translateX(100%);
  }
}

/* 头部样式 */
.login-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo-image {
  width: 80px;
  height: 80px;
  animation: pulse 3s infinite;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.7));
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.7));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.9));
  }
}

.title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}

/* Tabs样式 */
.login-tabs {
  margin-top: 20px;
}

:deep(.ant-tabs-tab) {
  font-size: 16px;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.7);
}

:deep(.ant-tabs-tab:hover) {
  color: #fff;
}

:deep(.ant-tabs-tab-active) {
  color: #fff;
  font-weight: 600;
}

:deep(.ant-tabs-ink-bar) {
  background: linear-gradient(90deg, #667eea, #764ba2);
  height: 3px;
}

/* 为不同主题定制Tabs下划线颜色 */
.login-container.theme-green :deep(.ant-tabs-ink-bar) {
  background: linear-gradient(90deg, #66eea2, #2c5f2d);
  height: 3px;
}

.login-container.theme-purple :deep(.ant-tabs-ink-bar) {
  background: linear-gradient(90deg, #c76cff, #5e2a5e);
  height: 3px;
}

.login-container.theme-darkblue :deep(.ant-tabs-ink-bar) {
  background: linear-gradient(90deg, #1890ff, #0f0c29);
  height: 3px;
}

.login-container.theme-blackblue :deep(.ant-tabs-ink-bar) {
  background: linear-gradient(90deg, #1677ff, #001529);
  height: 3px;
}

:deep(.ant-tabs-nav::before) {
  border-color: rgba(255, 255, 255, 0.2);
}

/* 自定义输入框 */
.custom-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: white;
  transition: all 0.3s ease;
}

:deep(.custom-input:hover) {
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

:deep(.custom-input:focus) {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

/* 为不同主题定制输入框聚焦颜色 */
.login-container.theme-green :deep(.custom-input:focus) {
  border-color: #66eea2;
  box-shadow: 0 0 0 2px rgba(102, 238, 162, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.login-container.theme-purple :deep(.custom-input:focus) {
  border-color: #c76cff;
  box-shadow: 0 0 0 2px rgba(199, 108, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.login-container.theme-darkblue :deep(.custom-input:focus) {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.login-container.theme-blackblue :deep(.custom-input:focus) {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

:deep(.custom-input .ant-input) {
  background: transparent;
  color: white;
  caret-color: white; /* 光标颜色设为白色 */
}

:deep(.custom-input .ant-input-prefix) {
  color: rgba(255, 255, 255, 0.7);
}

:deep(.custom-input .ant-input::placeholder) {
  color: rgba(255, 255, 255, 0.5);
}

/* 自定义复选框 */
.custom-checkbox :deep(.ant-checkbox-inner) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.custom-checkbox :deep(.ant-checkbox-checked .ant-checkbox-inner) {
  background-color: #667eea;
  border-color: #667eea;
}

/* 为不同主题定制复选框颜色 */
.login-container.theme-green .custom-checkbox :deep(.ant-checkbox-checked .ant-checkbox-inner) {
  background-color: #66eea2;
  border-color: #66eea2;
}

.login-container.theme-purple .custom-checkbox :deep(.ant-checkbox-checked .ant-checkbox-inner) {
  background-color: #c76cff;
  border-color: #c76cff;
}

.login-container.theme-darkblue .custom-checkbox :deep(.ant-checkbox-checked .ant-checkbox-inner) {
  background-color: #1890ff;
  border-color: #1890ff;
}

.login-container.theme-blackblue .custom-checkbox :deep(.ant-checkbox-checked .ant-checkbox-inner) {
  background-color: #1677ff;
  border-color: #1677ff;
}

.custom-checkbox :deep(.ant-checkbox-wrapper) {
  color: rgba(255, 250, 250, 0.8);
}

/* 表单选项 */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.forgot-link {
  color: #667eea;
  transition: all 0.3s ease;
}

.forgot-link:hover {
  color: #764ba2;
  text-shadow: 0 0 8px rgba(102, 126, 234, 0.6);
}

/* 为不同主题定制忘记密码链接颜色 */
.login-container.theme-green .forgot-link {
  color: #66eea2;
}

.login-container.theme-green .forgot-link:hover {
  color: #2c5f2d;
  text-shadow: 0 0 8px rgba(102, 238, 162, 0.6);
}

.login-container.theme-purple .forgot-link {
  color: #c76cff;
}

.login-container.theme-purple .forgot-link:hover {
  color: #5e2a5e;
  text-shadow: 0 0 8px rgba(199, 108, 255, 0.6);
}

.login-container.theme-darkblue .forgot-link {
  color: #1890ff;
}

.login-container.theme-darkblue .forgot-link:hover {
  color: #0f0c29;
  text-shadow: 0 0 8px rgba(24, 144, 255, 0.6);
}

.login-container.theme-blackblue .forgot-link {
  color: #1677ff;
}

.login-container.theme-blackblue .forgot-link:hover {
  color: #001529;
  text-shadow: 0 0 8px rgba(22, 119, 255, 0.6);
}

/* 登录按钮 */
.login-button {
  height: 48px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border: none;
  border-radius: 10px;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.login-button:active {
  transform: translateY(0);
}

/* 为不同主题定制登录按钮渐变色 */
.login-container.theme-green .login-button {
  background: linear-gradient(90deg, #66eea2, #2c5f2d);
  box-shadow: 0 4px 15px rgba(102, 238, 162, 0.3);
}

.login-container.theme-green .login-button:hover {
  box-shadow: 0 6px 20px rgba(102, 238, 162, 0.5);
}

.login-container.theme-purple .login-button {
  background: linear-gradient(90deg, #c76cff, #5e2a5e);
  box-shadow: 0 4px 15px rgba(199, 108, 255, 0.3);
}

.login-container.theme-purple .login-button:hover {
  box-shadow: 0 6px 20px rgba(199, 108, 255, 0.5);
}

.login-container.theme-darkblue .login-button {
  background: linear-gradient(90deg, #1890ff, #0f0c29);
  box-shadow: 0 4px 15px rgba(24, 144, 255, 0.3);
}

.login-container.theme-darkblue .login-button:hover {
  box-shadow: 0 6px 20px rgba(24, 144, 255, 0.5);
}

.login-container.theme-blackblue .login-button {
  background: linear-gradient(90deg, #1677ff, #001529);
  box-shadow: 0 4px 15px rgba(22, 119, 255, 0.3);
}

.login-container.theme-blackblue .login-button:hover {
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.5);
}

.login-button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(45deg);
  animation: button-shine 3s infinite;
}

@keyframes button-shine {
  0% {
    transform: rotate(45deg) translateX(-100%);
  }
  100% {
    transform: rotate(45deg) translateX(100%);
  }
}

/* 验证码区域 */
.captcha-wrapper {
  display: flex;
  gap: 10px;
}

.captcha-wrapper :deep(.ant-input) {
  flex: 1;
}

.captcha-button {
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  transition: all 0.3s ease;
}

.captcha-button:hover:not(:disabled) {
  background: rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.6);
}

/* 为不同主题定制验证码按钮颜色 */
.login-container.theme-green .captcha-button:hover:not(:disabled) {
  background: rgba(102, 238, 162, 0.3);
  border-color: rgba(102, 238, 162, 0.6);
}

.login-container.theme-purple .captcha-button:hover:not(:disabled) {
  background: rgba(199, 108, 255, 0.3);
  border-color: rgba(199, 108, 255, 0.6);
}

.login-container.theme-darkblue .captcha-button:hover:not(:disabled) {
  background: rgba(24, 144, 255, 0.3);
  border-color: rgba(24, 144, 255, 0.6);
}

.login-container.theme-blackblue .captcha-button:hover:not(:disabled) {
  background: rgba(22, 119, 255, 0.3);
  border-color: rgba(22, 119, 255, 0.6);
}

.captcha-button:disabled {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

/* 登录页脚 */
.login-footer {
  text-align: center;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 2;
}

.register-link {
  color: #667eea;
  font-weight: 600;
  margin-left: 5px;
  transition: all 0.3s ease;
}

.register-link:hover {
  color: #764ba2;
  text-shadow: 0 0 8px rgba(102, 126, 234, 0.6);
}

/* 为不同主题定制注册链接颜色 */
.login-container.theme-green .register-link {
  color: #66eea2;
}

.login-container.theme-green .register-link:hover {
  color: #2c5f2d;
  text-shadow: 0 0 8px rgba(102, 238, 162, 0.6);
}

.login-container.theme-purple .register-link {
  color: #c76cff;
}

.login-container.theme-purple .register-link:hover {
  color: #5e2a5e;
  text-shadow: 0 0 8px rgba(199, 108, 255, 0.6);
}

.login-container.theme-darkblue .register-link {
  color: #1890ff;
}

.login-container.theme-darkblue .register-link:hover {
  color: #0f0c29;
  text-shadow: 0 0 8px rgba(24, 144, 255, 0.6);
}

.login-container.theme-blackblue .register-link {
  color: #1677ff;
}

.login-container.theme-blackblue .register-link:hover {
  color: #001529;
  text-shadow: 0 0 8px rgba(22, 119, 255, 0.6);
}

/* 响应式设计 */
@media (max-width: 480px) {
  .login-card {
    margin: 20px;
    padding: 30px 20px;
  }

  .title {
    font-size: 22px;
  }

  .captcha-wrapper {
    flex-direction: column;
  }

  .captcha-button {
    width: 100%;
  }
}